package c.j.a.c.g$i;

import c.j.a.d.b.d.f0;

/* compiled from: AppDownloadDiskSpaceHandler */
public class a implements f0 {
    public int a;

    /* JADX WARNING: Removed duplicated region for block: B:8:0x0031  */
    /* JADX WARNING: Removed duplicated region for block: B:7:0x0030 A:{RETURN} */
    /* JADX WARNING: Removed duplicated region for block: B:43:0x00cc  */
    /* JADX WARNING: Removed duplicated region for block: B:42:0x00cb A:{RETURN} */
    public boolean a(long r20, long r22, c.j.a.d.b.d.e0 r24) {
        /*
        r19 = this;
        r1 = r19;
        r0 = r1.a;
        r0 = c.j.a.d.b.l.a.d(r0);
        r2 = "clear_space_use_disk_handler";
        r15 = 0;
        r2 = r0.b(r2, r15);
        r14 = 1;
        if (r2 == r14) goto L_0x0014;
    L_0x0012:
        r2 = 0;
        goto L_0x002e;
    L_0x0014:
        r2 = 600000; // 0x927c0 float:8.40779E-40 double:2.964394E-318;
        r4 = "clear_space_min_time_interval";
        r2 = r0.c(r4, r2);
        r4 = java.lang.System.currentTimeMillis();
        r6 = c.j.a.c.g$i.c.a();
        r6 = r6.a;
        r4 = r4 - r6;
        r6 = (r4 > r2 ? 1 : (r4 == r2 ? 0 : -1));
        if (r6 >= 0) goto L_0x002d;
    L_0x002c:
        goto L_0x0012;
    L_0x002d:
        r2 = 1;
    L_0x002e:
        if (r2 != 0) goto L_0x0031;
    L_0x0030:
        return r15;
    L_0x0031:
        r2 = java.lang.System.currentTimeMillis();
        r4 = c.j.a.c.g$i.c.a();
        java.util.Objects.requireNonNull(r4);
        r5 = java.lang.System.currentTimeMillis();
        r4.a = r5;
        r4 = android.os.Environment.getExternalStorageDirectory();
        r5 = r4.toString();
        r5 = r1.b(r5);
        c.h.a.m0.r.a.g();
        c.h.a.m0.r.a.q();
        r7 = r4.toString();
        r7 = r1.b(r7);
        r9 = java.lang.System.currentTimeMillis();
        r10 = r9 - r2;
        r2 = 0;
        r9 = (r7 > r22 ? 1 : (r7 == r22 ? 0 : -1));
        if (r9 >= 0) goto L_0x0092;
    L_0x0068:
        r9 = "clear_space_sleep_time";
        r12 = r0.c(r9, r2);
        r0 = (r12 > r2 ? 1 : (r12 == r2 ? 0 : -1));
        if (r0 > 0) goto L_0x0074;
    L_0x0072:
        r12 = r2;
        goto L_0x0085;
    L_0x0074:
        r16 = 5000; // 0x1388 float:7.006E-42 double:2.4703E-320;
        r0 = (r12 > r16 ? 1 : (r12 == r16 ? 0 : -1));
        if (r0 <= 0) goto L_0x007c;
    L_0x007a:
        r12 = r16;
    L_0x007c:
        java.lang.Thread.sleep(r12);	 Catch:{ InterruptedException -> 0x0080 }
        goto L_0x0085;
    L_0x0080:
        r0 = move-exception;
        r9 = r0;
        r9.printStackTrace();
    L_0x0085:
        r0 = (r12 > r2 ? 1 : (r12 == r2 ? 0 : -1));
        if (r0 <= 0) goto L_0x0093;
    L_0x0089:
        r0 = r4.toString();
        r7 = r1.b(r0);
        goto L_0x0093;
    L_0x0092:
        r12 = r2;
    L_0x0093:
        r16 = r7;
        r0 = c.j.a.c.g.y.a();
        r0 = c.j.a.d.b.e.i.a(r0);
        r2 = r1.a;
        r3 = r0.k(r2);
        if (r3 != 0) goto L_0x00a8;
    L_0x00a5:
        r18 = 1;
        goto L_0x00c7;
    L_0x00a8:
        r0 = (r16 > r22 ? 1 : (r16 == r22 ? 0 : -1));
        if (r0 <= 0) goto L_0x00ae;
    L_0x00ac:
        r0 = 1;
        goto L_0x00af;
    L_0x00ae:
        r0 = 0;
    L_0x00af:
        r2 = c.j.a.c.g.d();	 Catch:{ Exception -> 0x00c1 }
        r4 = r5;
        r6 = r16;
        r8 = r22;
        r18 = 1;
        r14 = r0;
        r2.j(r3, r4, r6, r8, r10, r12, r14);	 Catch:{ Exception -> 0x00bf }
        goto L_0x00c7;
    L_0x00bf:
        r0 = move-exception;
        goto L_0x00c4;
    L_0x00c1:
        r0 = move-exception;
        r18 = 1;
    L_0x00c4:
        r0.printStackTrace();
    L_0x00c7:
        r0 = (r16 > r22 ? 1 : (r16 == r22 ? 0 : -1));
        if (r0 >= 0) goto L_0x00cc;
    L_0x00cb:
        return r15;
    L_0x00cc:
        if (r24 == 0) goto L_0x00d1;
    L_0x00ce:
        r24.a();
    L_0x00d1:
        return r18;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.j.a.c.g$i.a.a(long, long, c.j.a.d.b.d.e0):boolean");
    }

    public final long b(String str) {
        try {
            return c.j.a.d.b.n.a.J(str);
        } catch (Exception e) {
            e.printStackTrace();
            return 0;
        }
    }
}
